﻿
/*******************************************************************************
 * Copyright © 2017 FriendStar.Framework 版权所有
 * Author: HYF
 * Description: FriendStar快速开发平台
 * Website：http://www.FriendStar.cn
*********************************************************************************/
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;
using FriendStar.Code;
using FriendStar.Domain.Entity.MainData;
using FriendStar.Domain.IRepository.MainData;
using FriendStar.Repository.MainData;

namespace FriendStar.Application.MainData
{
    public class CPK_ZD_13_DatStoreDefineApp
    {
        private ICPK_ZD_13_DatStoreDefineRepository service = new CPK_ZD_13_DatStoreDefineRepository();

        public List<CPK_ZD_13_DatStoreDefineEntity> GetList()
        {
            return service.IQueryable().ToList();
        }
        public CPK_ZD_13_DatStoreDefineEntity GetForm(string keyValue)
        {
            return service.FindEntity(keyValue);
        }
        public void DeleteForm(string keyValue)
        {
            
        }
        public void SubmitForm(CPK_ZD_13_DatStoreDefineEntity CPK_ZD_13_DatStoreDefineEntity, string keyValue)
        {
            if (!string.IsNullOrEmpty(keyValue))
            {
                service.Update(CPK_ZD_13_DatStoreDefineEntity);
            }
            else
            {
                service.Insert(CPK_ZD_13_DatStoreDefineEntity);
            }
        }
    }
}
